import request from '../utils/request';
// import { useTokenStore } from '../stores/token';
// 文字分类列表查询
export const articleCategoryService = () => {
    return request.get('/category')
}

export const addArticleCategoryService = (data) => {
    return request.post('/category', data)
}

export const updateService = (data) => {
    return request.put('/category/update', data)
}

export const deleteService = (id) => {
    return request.put('/category/delete?id='+id)
}

export const getArticleService = (pageData) => {
    return request.get('/article',{params:pageData})
}

export const getArticleByIdService = (id) => {
    return request.get('/article?id='+id)
}
export const addArticleService = (data) => {
    return request.post('/article', data)
}

export const deleteArticleService = (id) => {
    return request.delete('/article?id='+id)
}

// 文章数据修改
export const updateArticleService = (data) => {
    return request.put('/article', data)
}